package cn.dakaqi.dao;

import cn.dakaqi.entities.ActivityApply;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

/**
 * Created by chunyang on 2016/4/17.
 */
public interface ActivityApplyDao extends PagingAndSortingRepository<ActivityApply, Long>, JpaSpecificationExecutor<ActivityApply>
{
    @Query(nativeQuery = true,value = "select count(ID) from U_ACTIVITY_APPLY where ACTIVITY_ID =:actId and DEL_STATUS=0")
    int countByActivity(@Param("actId") Long actId);
}
